﻿using System.IO;

namespace VM.Common.Helper
{
    public static class FilePaths
    {
        private static string _ConfigFilePath = Directory.GetCurrentDirectory() + "\\ConfigFile-\\";
        public static string ConfigFilePath
        {
            get
            {
                if (string.IsNullOrEmpty(_ConfigFilePath))
                {
                    _ConfigFilePath = Directory.GetCurrentDirectory() + "\\ConfigFile\\";
                }
                if (!Directory.Exists(_ConfigFilePath))
                {
                    Directory.CreateDirectory(_ConfigFilePath);
                }
                return _ConfigFilePath;
            }
        }

        private static string _SystemConfig = ConfigFilePath + "SystemConfig.json";
        public static string SystemConfig
        {
            get
            {
                if (!File.Exists(_SystemConfig))
                {
                    File.Create(_SystemConfig).Close();
                }
                return _SystemConfig;
            }
        }

        private static string _DockLayout = ConfigFilePath + "DockLayout.config";
        public static string DockLayout
        {
            get
            {
                if (!File.Exists(_DockLayout))
                {
                    File.Create(_DockLayout).Close();
                }
                return _DockLayout;
            }
        }

        /// <summary>
        /// 页面配置文件
        /// </summary>
        private static string _DefaultDockLayout = ConfigFilePath + "DefaultDockLayout.config";
        public static string DefaultDockLayout
        {
            get
            {
                if (!File.Exists(_DefaultDockLayout))
                {
                    File.Create(_DefaultDockLayout).Close();
                }
                return _DefaultDockLayout;
            }
        }

        private static string _HelpDecomentPath = Directory.GetCurrentDirectory() + "\\Help\\";
        public static string HelpDecomentPath
        {
            get
            {
                if (string.IsNullOrEmpty(_HelpDecomentPath))
                {
                    _HelpDecomentPath = Directory.GetCurrentDirectory() + "\\Help\\";
                }
                return _HelpDecomentPath;
            }
        }

    }
}
